const { createProxyMiddleware } = require("http-proxy-middleware");

module.exports = function (app) {
  // 以ajax开头的走到这个代理里面来 完了要重启
  app.use(
    "/ajax",
    createProxyMiddleware({
      target: "https://i.maoyan.com",
      changeOrigin: true,
      headers: {
        // Cookie: "_lxsdk_cuid=1805ff5",
        "content-type": "application/json;charset=utf-8",
      },
    })
  );
};
